use mlua::{UserData, UserDataMethods, Function};

#[derive(serde::Deserialize,Clone,serde::Serialize,Default)]
pub struct FuncModule {}

impl UserData for FuncModule {
    fn add_methods<'lua, M: UserDataMethods<'lua, Self>>(methods: &mut M) {
        methods.add_async_method ("call",|_lua,_func,call:Function|async move{
            let a = call.call::<_,i32>((1,2));
            Ok(a)
        });
    }
}